<template>
    <el-dialog :visible.sync="visible" v-dialogDrag :title="title" :close-on-click-modal="false" class="tl-dialog" width="1200px" @open="open" @close="close" :append-to-body="true">
    <el-form class="tl-form" ref="form" :model="model" :rules="rules" label-width="150px" :disabled="!editable || disableEditSubmit">
			<!-- <el-row>
				<el-col :span="12">
					<el-form-item label="策划书id" prop="planid" >
						<el-input-number v-model="model.planid" controls-position="right" :step="1" :min="0" style="width:100%"></el-input-number>
					</el-form-item>
				</el-col>
			</el-row> -->
			<el-row>
				<!-- <el-col :span="12">
					<el-form-item label="关键决策人" prop="decisionmaker" :rules="rules.validateRequire">
						<el-input v-model="model.decisionmaker" ></el-input>
					</el-form-item>
				</el-col> -->
				<el-col :span="12">
					<el-form-item label="职务" prop="post" :rules="rules.validateRequire">
						<el-input v-model="model.post" ></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="客户关系等级" prop="customerlevel" :rules="rules.validateRequire">
						<el-select v-model="model.customerlevel" filterable clearable>
							<el-option v-for="item in codeModel.customerlevelList" :key="item.code" :label="item.name" :value="item.code" />
						</el-select>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="关注项点" prop="focus" :rules="rules.validateRequire">
						<el-input v-model="model.focus" type="textarea" maxlength="500" show-word-limit :rows="2"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="客户关系策略" prop="customerstrategy" :rules="rules.validateRequire">
						<el-input v-model="model.customerstrategy" type="textarea" maxlength="500" show-word-limit :rows="2"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="备注" prop="description" >
						<el-input v-model="model.description" type="textarea" maxlength="500" show-word-limit :rows="4"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button :type="disableEditSubmit === false ? 'text' : 'primary'" @click="doCancelEdit">取消</el-button>
      <el-button type="primary" @click="doSubmitEdit" :loading="saveLoading" v-if="editable && !disableEditSubmit">确认</el-button>
    </div>
  </el-dialog>
</template>

<script>
/** mixins */
import { mixin_edit } from '@tapui/mixins/mixin_edit'
/** 子组件 */
/** 工具类 */
import { putAction, getAction, postAction, deleteAction } from '@tapui/utils/http'
/** VUE配置 */
export default {
  mixins: [mixin_edit],
  components: { },
  data() {
    return {
      moduleTitle: '客户决策链分析',
      urlPrefix: '/mpm/customerAnalysis/',
      url: {
        // 额外的url
      }
    }
  },
props: {
    parentId: {
      type: [Number, String],
      default: ''
    },
    projectinfo: {

    },
    editable: {
      type: Boolean,
      default: true
    }
  },
  methods: {
    loaded() {
      // 页面加载完毕执行
	if (this.isAdd) {
        this.$set(this.model, 'planid', this.parentId)
      }
    }
  }
}
</script>

